<?php
//	  PHPcongrats - Holiday and Birthday Mailer
//	
//    Copyright (C) 2011  Matthias Nass
//
//    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.


function date_mysql2german($date) {
    $dt    =    explode(" ",$date);
    $d    =    explode("-",$dt[0]);
    
    return    sprintf("%02d.%02d.%04d", $d[2], $d[1], $d[0])." ".$dt[1];
}

function date_mysql2day($date) {
    $dt    =    explode(" ",$date);
    $d    =    explode("-",$dt[0]);
    
    return    sprintf("%02d", $d[2]);
}

function date_mysql2month($date) {
    $dt    =    explode(" ",$date);
    $d    =    explode("-",$dt[0]);
    
    return    sprintf("%02d", $d[1]);
}

function date_mysql2year($date) {
    $dt    =    explode(" ",$date);
    $d    =    explode("-",$dt[0]);
    
    return    sprintf("%02d", $d[0]);
}

?>